package com.gfv.comunes;

public class Cadenas {
	public static String Left(String cad, int numpos)
	{
		return Mid(cad,0,numpos);
	}
	public static String Mid(String cad, int orig, int numpos)
	{
		StringBuffer buf=new StringBuffer();
		for(int i=orig;i<(orig+numpos);i++)
		{
			buf.append(cad.charAt(i));
		}

		return buf.toString();
	}
	public static boolean isNumeric(String val)
	{
		
		try{

			Integer.parseInt(val);
			return true;
		} catch (NumberFormatException ex){
			return false;
		}


	}
}
